package com.cskaoyan.chapter0503.common;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author:WalterChan
 * @Decription:Employee
 * @Date Created in 2024-06-10-19:38
 */
public class Employee {
    @Override
    public String toString() {
        return "Employee{" +
                "name='" + name + '\'' +
                ", salary=" + salary +
                ", hireDay=" + hireDay +
                '}';
    }

    private String name;
    private double salary;
    private  LocalDateTime hireDay;

    public Employee(String name, double salary, int year,int month,int day) {
        this.name = name;
        this.salary = salary;

        this.hireDay = LocalDateTime.of(year,month,day,0,0);
    }

    public void raiseSalary(double persent){
        this.salary=salary+salary*(persent)/100;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public LocalDateTime getHireDay() {
        return hireDay;
    }

    public void setHireDay(LocalDateTime hireDay) {
        this.hireDay = hireDay;
    }
}
